#include <bits/stdc++.h>
using namespace std;

const double eps = 1e-8;
int sgn(double x) {
    return (x > eps) - (x < -eps);
}

template<typename T>
struct point {
    T x, y;
    point(T x=0, T y=0):x(x), y(y){}  

    T operator * (const point &other) const {
        return x * other.y - y * other.x;
    }

    point operator - (const point &other) const {
        return point(x - other.x, y - other.y);
    }
};

template<typename T>
struct triangle {
    point<T> a, b, c;
    triangle(){}
    triangle(point<T> a, point<T> b, point<T> c):a(a), b(b), c(c){}

    bool testorigin() {
        auto p = [](point<T> o, point<T> a, point<T> b) {
            point<T> v1 = a - o, v2 = b - o;
            point<T> v = point<T>(0, 0) - o;
            T x = (v1 * v) * (v * v2);
            return sgn(x) == 1;
        };

        return p(a, b, c) && p(b, a, c) && p(c, a, b);
    }
};

point<double> read() {
    double x, y;
    scanf("%lf,%lf", &x, &y); getchar();
    return point<double>(x, y);
}

int main(int argc, char const *argv[])
{
    int n = 1000;
    int ans = 0;
    for (int i=1; i<=n; ++i) {
        point<double> p1 = read(), p2 = read(), p3 = read();
        triangle<double> t(p1, p2, p3);
        ans += t.testorigin();
        
    }
    printf("%d\n", ans);
    return 0;
}
